﻿@model Core.Models.RegisterModel

@{
    ViewBag.Title = "Register";
    Layout = ((Core.Models.Theme)Session["Theme"]).Layout;
}

<h2>Create a New Account</h2>
<p>
    Use the form below to create a new account. 
</p>
<p>
    Passwords are required to be a minimum of @ViewBag.PasswordLength characters in length.
</p>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
    <table width="90%" cellspacing="0" cellpadding="5" border="0">
    <tr>
        <td valign="top">
        <fieldset>
            <legend>Account Information</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.FirstName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.FirstName)
                @Html.ValidationMessageFor(m => m.FirstName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.LastName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.LastName)
                @Html.ValidationMessageFor(m => m.LastName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>
        </fieldset>
        </td>        
        <td valign="top">
        <fieldset>
            <legend>Security</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.SecurityQuestion)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.SecurityQuestion)
                @Html.ValidationMessageFor(m => m.SecurityQuestion)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.SecurityAnswer)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.SecurityAnswer)
                @Html.ValidationMessageFor(m => m.SecurityAnswer)
            </div>
        </fieldset>
        </td>
    </tr>
    <tr>
        <td colspan="2">
        &nbsp;
        </td>
    </tr>
    <tr>
        <td colspan="2">
                <input type="submit" value="Register" />
        </td>
    </tr>
    </table>
}
